Imports Leadtools.Dicom
Imports Leadtools.Dicom.Common
Imports Leadtools.Dicom.Common.Extensions
Imports Leadtools.Dicom.Common.Linq
Imports Leadtools.Dicom.Common.Linq.BasicDirectory
Imports Leadtools
Imports Leadtools.Dicom.Common.DataTypes
Public Sub GetNewViewPerspectiveExample()
' Create a new coronal PlaneOrientation that corresponds to a horizontal flip
Dim poCoronal As New PlaneOrientation()
poCoronal.Name = "Coronal or Frontal"
' This corresponds to a horizontal flip
poCoronal.Top = OrientationAxis.Inferior
poCoronal.Right = OrientationAxis.Right
' This condition is ignored
Dim condition As New TagValueOrientationCondition(DicomTag.ImageOrientationPatient, Nothing)
poCoronal.Condition = condition
' This specifies a row and column orientation vector that correspond to a coronal slice
' Row: (1,0,0)
' Col: (0,0,-1)
Dim imageOrientationVectors() As Double = {1, 0, 0, 0, 0, -1}
' Find the new view perspective
Dim newViewPerspective As RasterViewPerspective = DicomExtensions.GetNewViewPerspective(RasterViewPerspective.TopLeft, imageOrientationVectors, poCoronal)
' New view perspective should be BottomLeft
MessageBox.Show("newViewPerspective should be BottomLeft" & Constants.vbLf & "Actual newViewPerspective is " & newViewPerspective.ToString())
End Sub